{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello\n"
     ]
    }
   ],
   "source": [
    "print('hello')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hi,jupyter\n"
     ]
    }
   ],
   "source": [
    "print('hi,jupyter')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "str"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type('hello')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "int"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "str1 = '字符串1'\n",
    "str2 = \"字符串2\"\n",
    "str3 = \"\"\"\n",
    "     ddddfdf\n",
    "dfdfdfd\n",
    "dfd\n",
    "dd\n",
    "fdfd\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "字符串1 字符串2 \n",
      "     ddddfdf\n",
      "dfdfdfd\n",
      "dfd\n",
      "dd\n",
      "fdfd\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(str1,str2,str3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1, 2, 3, '重庆', True)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "tuple"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "t1 = (1,2,3,'重庆',True)\n",
    "print(t1)\n",
    "type(t1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[3, 6, 9] <class 'list'>\n"
     ]
    }
   ],
   "source": [
    "\n",
    "list1 = [3,6,9]\n",
    "print(list1, type(list1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'姓名': '韬略哥', '绩点': 3.932} <class 'dict'>\n"
     ]
    }
   ],
   "source": [
    "\n",
    "dict1 = {\n",
    "  '姓名': '韬略哥',\n",
    "  \"绩点\": 3.932,\n",
    "  }\n",
    "print(dict1, type(dict1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{8, 4} <class 'set'>\n"
     ]
    }
   ],
   "source": [
    "set1 = {4,8}\n",
    "print(set1,type(set1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "# ndarray\n",
    "\n",
    "import numpy as np\n",
    "data1=(1,2,3,4\n",
    ")\n",
    "array1=np.array(data1,dtype=np.float32)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "s1 = pandas.Series([\"小明\",\"小强\", \"小丽\"], index=[\"P202020117\", \"P202020118\", \"P202020119\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "            one  two   学生\n",
      "P202020117  NaN  NaN   小明\n",
      "P202020118  NaN  NaN   小强\n",
      "P202020119  NaN  NaN   小丽\n",
      "a           1.0  1.0  NaN\n",
      "b           2.0  2.0  NaN\n",
      "c           3.0  3.0  NaN\n",
      "d           NaN  4.0  NaN <class 'pandas.core.frame.DataFrame'>\n"
     ]
    }
   ],
   "source": [
    "d = {\n",
    "    \"one\": pandas.Series([1.0, 2.0, 3.0], index=[\"a\", \"b\", \"c\"]),\n",
    "    \"two\": pandas.Series([1.0, 2.0, 3.0, 4.0], index=[\"a\", \"b\", \"c\", \"d\"]),\n",
    "    \"学生\": s1,\n",
    "}\n",
    "\n",
    "df = pandas.DataFrame(d)\n",
    "print(df,type(df))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.8.10 64-bit",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "138148c979a60859ae74ca41993c9becbe8ce800154b30dc52652dbd6e25207c"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
